#include	<iostream>
#include	<SFML/Network.hpp>
#include	"IA.hh"

void		_ia_start(char *argv[])
{
  IA		ia(argv[1]);

  if (!(ia.connectServer(argv[1], argv[2])))
    {
      std::cerr << "Remote connexion not possible\n";
      exit(-1);
    }
  if (!(ia.discoverServer()))
    {
      std::cout << "Server isn't using the same prot. as us\n";
      exit(-1);
    }
}

int		main(int argc, char *argv[])
{
  if (argc < 3)
    {
      std::cerr << "Usage: ./gomokuia [IP] [PORT]" << std::endl;
      return -1;
    }
  else
    _ia_start(argv);
  return 0;
}
